﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.Site.OptionHtmlModel>" %>
<%@ Import Namespace="Code.Models" %>
<%@ Import Namespace="QianBuo.Lottery.Web.Areas.Manage.Models.Site" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%=Model.Key.GetDetail().Name %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div>
    <% Html.DisableClientValidation(); %>
    <% Html.BeginForm(new { id = "optionhtmlform" }, new {id=Model.Key, ReturnUrl=Request["ReturnUrl"],act=Request["act"],cont=Request["cont"],arst=Request["arst"]}); %>
    <fieldset>
        <legend><%=Model.Key.GetDetail().Name %></legend>
        <%=Html.HiddenFor(p=>p.Key) %>
        <%if (Request["ReturnUrl"] != null){%>
        <a class="a_blue" href='<%=Request["ReturnUrl"] %>'>&gt;&gt;返回</a>
        <%}else {%>
        <%=Html.ActionLink("返回", "Option", null, new { @class="a_blue"})%>
        <%} %>
        <textarea id="Value" name="Value"><%=Model.Value %></textarea>
        <ul class="editlist">
        <% if(!ViewData.ModelState.IsValid){ %>
        <li>
            <%=Html.ValidationMessage("Error") %>
        </li>
        <%} %>
        <li class="btn">
            <input type="submit" value='保存' />
        </li>
        </ul>
    </fieldset>
    <% Html.EndForm(); %>
</div>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.colors.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.styles.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.syntax.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/htmlbox.full.js") %>' type="text/javascript"></script>
    <script src='<%=Url.Content("~/Scripts/htmlbox4.0/xhtml.js") %>' type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#optionhtmlform textarea").css({ width: "100%", height: "500px" }).htmlbox({
                toolbars: [
                [
                // Cut, Copy, Paste
                "separator", "cut", "copy", "paste",
                // Undo, Redo
                "separator", "undo", "redo",
                // Bold, Italic, Underline, Strikethrough, Sup, Sub
                "separator", "bold", "italic", "underline", "strike", "sup", "sub", "removeformat",
                // Left, Right, Center, Justify
                "separator", "justify", "left", "center", "right",
                // Ordered List, Unordered List, Indent, Outdent
                "separator", "ol", "ul", "indent", "outdent",
                // Hyperlink, Remove Hyperlink, Image
                "separator", "link", "unlink", "image"

                ],
                [// Show code
                "separator", "code",
                // Formats, Font size, Font family, Font color, Font, Background
                "separator", "formats", "fontsize", "fontfamily",
                "separator", "fontcolor", "highlight"
                ]
                ],
                skin: "blue",
                idir: '<%=Url.Content("~/Scripts/htmlbox4.0/images/") %>',
                about: false,
                css: {
                    "background",""
                }
            });
        });
    </script>
</asp:Content>
